<template>
	<view class="container">
		<view class="activity-title">
			夏令营活动标题夏令营活动标题夏令营活动标题
			户外协议
		</view>
		<view class="list-item">
			<view class="item-left">
				<image :src="data.src" class="img"></image>
			</view>
			<view class="item-right">
				<view class="title">{{data.title}}</view>
				<view class="course-info">
					<view>课程信息</view>
					<view>{{data.courseInfo}}</view>
				</view>
				<view class="camp">
					<view>营期</view>
					<view>{{data.camp}}</view>
				</view>
				<view class="money">
					<view>
						<image src="https://lives-1308318918.cos.ap-shanghai.myqcloud.com/usr/dingjin.png"></image>
						<span>￥{{data.deposit}}</span>
						<view class="depositMessage">{{data.depositMessage}}</view>
					</view>
					<view>
						<image src="https://lives-1308318918.cos.ap-shanghai.myqcloud.com/usr/weikuan.png"></image>
						<span>￥{{data.balancePayment}}</span>
						<view class="balanceMessage">{{data.balanceMessage}}</view>
					</view>
				</view>
			</view>
		</view>
		<view class="student-info">
			<view class="title">学员信息</view>
			<view v-for="item in data.studentInfo" class="student-list-item">
				<view class="name">{{item.name}}</view>
				<view class="sex">{{item.sex}}</view>
				<view class="phone">{{item.phone}}</view>
			</view>
		</view>
		<view class="agreement">
			<u-checkbox-group>
				<u-checkbox v-model="checked" shape="circle">我已了解夏令营关于活动的一些协议内容</u-checkbox>
			</u-checkbox-group>
		</view>
		<view class="sign-btn">
			<button>确认签署</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				checked: false,
				data: {
					id: 5,
					school: '佛山校区',
					src: 'https://lives-1308318918.cos.ap-shanghai.myqcloud.com/usr/vip.png',
					status: '待结算尾款',
					title: '5天小众海滩+海韵椰林+休闲度假度蜜月',
					courseInfo: '5天少年特训营',
					camp: '2023-06-35—2023-07-07',
					deposit: 500,
					balancePayment: 2300,
					depositMessage: '于2023-07-01已支付',
					balanceMessage: '已支付',
					studentInfo: [{
							name: '王小米',
							sex: "男",
							phone: '18773465029'
						},
						{
							name: '王小米',
							sex: "男",
							phone: '18773465029'
						}
					],
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.sign-btn {
		display: flex;
		justify-content: center;
		padding: 200rpx 0 300rpx 0;

		button {
			width: 70%;
			background-color: #C0C4C1;
			color: #FFFFFF;
			border-radius: 20rpx;
			padding: 20rpx 40rpx;
			font-size: 34rpx;
		}
	}

	.agreement {
		margin-top: 50rpx;
	}

	.container {
		padding: 30rpx;
		background-color: white;
		min-height: 100vh;

		.activity-title {
			width: 90%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin: 0 auto;
			font-size: 32rpx;
			text-align: center;
			font-weight: 600;
		}
	}

	.bottom {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 40rpx;

		.item-left {
			span {
				color: red;
				padding-left: 20rpx;
			}
		}

		.item-right {
			display: flex;

			button {
				font-size: 32rpx;
				margin-left: 20rpx;
				background-color: #007E51;
				color: white;
				padding: 20rpx 40rpx;
			}
		}
	}

	.money-info {
		.title {
			font-size: 32rpx;
			font-weight: 600;
			text-align: left;
			margin-top: 30rpx;
		}

		view {
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
	}

	.student-info {
		.title {
			font-size: 32rpx;
			font-weight: 600;
			text-align: left;
			margin-top: 30rpx;
		}

		.student-list-item {
			display: flex;
			justify-content: space-around;
			text-align: center;
			align-items: center;
			margin-top: 30rpx;

			button {
				border-radius: 20rpx;
				font-size: 32rpx;
				color: #007E51;
				border: 1px solid #007E51;
				padding: 5rpx 30rpx;
			}
		}
	}

	.address {
		font-size: 32rpx;
		margin-top: 20rpx;

		view {
			padding-bottom: 10rpx;
			display: flex;

			.key {
				color: #414141
			}

			.value {
				padding-left: 40rpx;
				color: #161D1A
			}
		}
	}

	.list-item {
		background-color: white;
		display: flex;
		justify-content: center;

		.item-left {
			padding: 20rpx 10rpx;
			box-sizing: border-box;
			width: 30vw;

			.school {
				display: flex;
				width: 100%;
				height: 50rpx;

				image {
					height: 50rpx;
					width: 50rpx;
				}
			}

			.img {
				width: 100%;
				height: 200rpx;
				margin-right: 10rpx;
			}
		}

		.item-right {
			padding: 20rpx;
			box-sizing: border-box;
			width: 70vw;

			.title {
				font-size: 32rpx;
				font-weight: 600;
				display: -webkit-box;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1;
				overflow: hidden;
			}

			.money {
				.balanceMessage {
					color: #C0C4C1;
				}

				span {
					color: #F2450F;
					font-size: 32rpx;
					vertical-align: middle;
				}

				.depositMessage {
					color: #C0C4C1
				}

				image {
					vertical-align: middle;
					width: 50rpx;
					height: 50rpx;
				}
			}

			view {
				// padding: 5rpx 0;
			}

			.camp,
			.money,
			.course-info {
				display: flex;
				justify-content: space-between;
			}

			.btn {
				display: flex;
				justify-content: flex-end;
				margin-top: 20rpx;

				button {
					color: #007E51;
					border-color: #007E51;
					// border-radius: 60rpx;
					margin-left: 30rpx;
				}
			}
		}
	}
</style>